/**
 * Copyright (C) 2018-2020
 * All rights reserved, Designed By www.yixiang.co

 */
package co.yixiang.modules.statistics.dto;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import co.yixiang.domain.BaseDomain;
import co.yixiang.modules.user.service.dto.WechatUserDto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
* @author hupeng
* @date 2020-05-12
*/

@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString
public class YxUserDto extends BaseDomain {

    /** 用户id */
    @TableId(value = "uid", type = IdType.AUTO)
    private Long uid;
    /** 用户账户(跟accout一样) */
    private String username;
    /** 真实姓名 */
    private String realName;
    private Integer userPermiss;
    /** 用户昵称 */
    private String nickname;
    /** 用户头像 */
    private String avatar;
    /** 手机号码 */
    private String phone;
    /** 用户余额 */
    private BigDecimal nowMoney;
    /** 积分券 */
    private BigDecimal integralCoupon;
    /** 佣金金额 */
    private BigDecimal brokeragePrice;
    /** 用户剩余积分 */
    private BigDecimal integral;
    /** 下级人数 */
    private Integer spreadCount;
    private BigDecimal auctionAmount;

    public void copy(YxUserDto source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
